package day_2022_12_to_3.day;

/**
 * @author haomin
 * @date 2022/12/11 12:00
 **/
public class Day12_11_Num1827 {
    class Solution {
        public int minOperations(int[] nums) {
            if(nums.length < 2) return 0;
            int ans = 0;
            for(int i = 1; i < nums.length; ++i) {
                while(nums[i-1] >= nums[i]) {
                    nums[i] += 1;
                    ans++;
                }
            }
            return ans;
        }
    }
}